fix: properly hide menu bar items on ultra-wide and multi-monitor setups#354
fix: properly hide menu bar items on ultra-wide and multi-monitor setups#354laveez wants to merge 1 commit into
Conversation
- Fix collapse calculation to use the widest connected display instead of the currently focused screen - Raise the collapse width cap from 4,000 to 10,000 (macOS hard limit) - Keep the bar collapsed when displays are connected or disconnected - Fix collapsed state detection to be resilient to width recalculations Fixes dwarvesf#314, fixes dwarvesf#345, fixes dwarvesf#353
|
Requesting review from @viettrungphan, @phucledien |
|
I'm having the same problem on a monitor with a resolution of 5120x1440. |
|
We need someone to review and merge please. |
|
I also have this issue, on a secondary monitor that is 2560x1440. |
- chore: bump deployment target to macOS 10.13 (Xcode 26 requirement) - fix: properly hide menu bar items on ultra-wide and multi-monitor setups (PR dwarvesf#354, laveez) Closes upstream dwarvesf#314, dwarvesf#345, dwarvesf#353.
Adds the non-overlapping pieces of huynguyenh's PR dwarvesf#335 on top of rm335's PR dwarvesf#346. Handles the biggest leak source (NSLayoutConstraint retention when NSImageViews were recreated 9-10 times per toggle). - Deactivate NSLayoutConstraints before removing views in NSStackView.removeAllSubViews (prevents constraint retention of removed NSImageViews — primary leak source on macOS Sequoia/Tahoe) - Extend StatusBarController.deinit to invalidate timer and remove the always-hidden NSStatusItem - Change toggleStatusBarIfNeeded to only create the always-hidden status item when it doesn't already exist, instead of tearing down and recreating on every .alwayHideToggle notification Combined with the widest-display collapse-length calc in dwarvesf#354 and the bounded-length work in dwarvesf#344, this should resolve the runaway memory growth reported in upstream dwarvesf#326, dwarvesf#336, dwarvesf#351, dwarvesf#352. Co-Authored-By: huynguyenh <hoanghuy2908@gmail.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- chore: bump deployment target to macOS 10.13 (Xcode 26 requirement) - fix: properly hide menu bar items on ultra-wide and multi-monitor setups (PR dwarvesf#354, laveez) Closes upstream dwarvesf#314, dwarvesf#345, dwarvesf#353.
Adds the non-overlapping pieces of huynguyenh's PR dwarvesf#335 on top of rm335's PR dwarvesf#346. Handles the biggest leak source (NSLayoutConstraint retention when NSImageViews were recreated 9-10 times per toggle). - Deactivate NSLayoutConstraints before removing views in NSStackView.removeAllSubViews (prevents constraint retention of removed NSImageViews — primary leak source on macOS Sequoia/Tahoe) - Extend StatusBarController.deinit to invalidate timer and remove the always-hidden NSStatusItem - Change toggleStatusBarIfNeeded to only create the always-hidden status item when it doesn't already exist, instead of tearing down and recreating on every .alwayHideToggle notification Combined with the widest-display collapse-length calc in dwarvesf#354 and the bounded-length work in dwarvesf#344, this should resolve the runaway memory growth reported in upstream dwarvesf#326, dwarvesf#336, dwarvesf#351, dwarvesf#352. Co-Authored-By: huynguyenh <hoanghuy2908@gmail.com>
|
Hello @tieubao I hope you all is well. May we please request for your help with merging this issue please. Thank you. Kind Regards, |
|
Yes please, we really need this to be merged to the main branch. Thank you. |
|
Hello @tieubao I hope you all is well. May we please request for your help with merging this issue please. Thank you. Kind Regards, |
Absorbs the still-relevant pieces of three community PRs that overlapped this branch, with authorship credit: - collapse length re-applies to the live separator when displays change, and isCollapsed compares > btnHiddenLength so the state survives the recompute; collapse sizing uses frame.width x2 capped at the documented 10,000pt NSStatusItem maximum (from #354) - NSLayoutConstraint.deactivate before removeFromSuperview in removeAllSubViews, plugging the tutorial-view rebuild leak (from #335) - PreferencesViewController balances its prefsChanged observer in deinit (from #335/#346) Co-authored-by: Laveez <niko.muukkonen1@gmail.com> Co-authored-by: huynguyenh <hoanghuy2908@gmail.com> Co-authored-by: Rob Mulder <hallo@robmulder.com>
|
Thanks for this: it caught two things the in-flight #363 branch had missed. We've absorbed your live length re-apply on display change, the |
Absorbs the still-relevant pieces of three community PRs that overlapped this branch, with authorship credit: - collapse length re-applies to the live separator when displays change, and isCollapsed compares > btnHiddenLength so the state survives the recompute; collapse sizing uses frame.width x2 capped at the documented 10,000pt NSStatusItem maximum (from #354) - NSLayoutConstraint.deactivate before removeFromSuperview in removeAllSubViews, plugging the tutorial-view rebuild leak (from #335) - PreferencesViewController balances its prefsChanged observer in deinit (from #335/#346) Co-authored-by: Laveez <niko.muukkonen1@gmail.com> Co-authored-by: huynguyenh <hoanghuy2908@gmail.com> Co-authored-by: Rob Mulder <hallo@robmulder.com>
Absorbs the still-relevant pieces of three community PRs that overlapped this branch, with authorship credit: - collapse length re-applies to the live separator when displays change, and isCollapsed compares > btnHiddenLength so the state survives the recompute; collapse sizing uses frame.width x2 capped at the documented 10,000pt NSStatusItem maximum (from #354) - NSLayoutConstraint.deactivate before removeFromSuperview in removeAllSubViews, plugging the tutorial-view rebuild leak (from #335) - PreferencesViewController balances its prefsChanged observer in deinit (from #335/#346) Co-authored-by: Laveez <niko.muukkonen1@gmail.com> Co-authored-by: huynguyenh <hoanghuy2908@gmail.com> Co-authored-by: Rob Mulder <hallo@robmulder.com>
Problem
Since v1.10, hidden menu bar items reappear on ultra-wide monitors and multi-display setups. The collapse width is calculated from the currently focused screen rather than the widest one, so switching focus to a smaller display causes items to show through. Additionally, connecting or disconnecting a display resets the collapsed state.
Solution
Testing
Tested on MacBook Pro with external ultra-wide (3440x1440). Collapse/expand, display switching, display connect/disconnect, auto-hide, and always-hidden section all work correctly.
Related
Fixes #314, fixes #345, fixes #353. Supersedes #347.